import request from '@/utils/request'

let AppSettingApi = {
  /*小程序*/
  appwxDetail(data, errorback) {
    return request._get('/shop/appSetting/appWx/index', data, errorback);
  },
  /*小程序*/
  editAppWx(data, errorback) {
    return request._post('/shop/appSetting/appWx/edit', data, errorback);
  },
  /*公众号*/
  appmpDetail(data, errorback) {
    return request._get('/shop/appSetting/appMp/index', data, errorback);
  },
  /* 公众号登录模式 */
  mpLoginSetting(data,errorback){
    return request._get('/shop/index/loginSetting', data, errorback);
  },
  /*公众号*/
  editAppMp(data, errorback) {
    return request._post('/shop/appSetting/appMp/edit', data, errorback);
  },
  /*app*/
  appDetail(data, errorback) {
    return request._get('/shop/appSetting/app/index', data, errorback);
  },
  /*app*/
  editApp(data, errorback) {
    return request._post('/shop/appSetting/app/edit', data, errorback);
  },
  /*app开放平台*/
  appopenDetail(data, errorback) {
    return request._get('/shop/appSetting/appOpen/index', data, errorback);
  },
  /*app开放平台*/
  editAppOpen(data, errorback) {
    return request._post('/shop/appSetting/appOpen/edit', data, errorback);
  },
  /*app分享*/
  appshareDetail(data, errorback) {
    return request._get('/shop/appSetting/appShare/index', data, errorback);
  },
  /*app分享*/
  editAppShare(data, errorback) {
    return request._postBody('/shop/appSetting/appShare/edit', data, errorback);
  },
  /*app升级-列表*/
  appUpdateList(data, errorback) {
    return request._postBody('/shop/appSetting/appUpdate/index', data, errorback);
  },
  /*app升级-新增*/
  addAppUpdate(data, errorback) {
    return request._postBody('/shop/appSetting/appUpdate/add', data, errorback);
  },
  /*app升级-修改*/
  editAppUpdate(data, errorback) {
    return request._postBody('/shop/appSetting/appUpdate/edit', data, errorback);
  },
  /*app升级-删除*/
  delAppUpdate(data, errorback) {
    return request._post('/shop/appSetting/appUpdate/delete', data, errorback);
  },
  /*支付方式*/
  payDetail(data, errorback) {
    return request._get('/shop/appSetting/app/pay', data, errorback);
  },
  /*支付方式*/
  editPay(data, errorback) {
    return request._postBody('/shop/appSetting/app/editPay', data, errorback);
  },
  /*上传*/
  uploadP12(formData, errorback) {
      return request._upload('/shop/appSetting/app/uploadP12', formData, errorback);
  },
}

export default AppSettingApi;
